package com.ruoyi.swla2.service.impl;

import com.ruoyi.swla2.domain.TerminalsReplace;
import com.ruoyi.swla2.mapper.TerminalsReplaceMapper;
import com.ruoyi.swla2.service.ITerminalsReplaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 换表明细Service业务层处理
 *
 * @author gdqt
 * @date 2023-06-16
 */
@Service
public class TerminalsReplaceServiceImpl implements ITerminalsReplaceService {
    @Autowired
    private TerminalsReplaceMapper terminalsReplaceMapper;

    /**
     * 查询换表明细
     *
     * @param tenantId 换表明细主键
     * @return 换表明细
     */
    @Override
    public TerminalsReplace selectTerminalsReplaceByTenantId(String tenantId) {
        return terminalsReplaceMapper.selectTerminalsReplaceByTenantId(tenantId);
    }

    /**
     * 查询换表明细列表
     *
     * @param terminalsReplace 换表明细
     * @return 换表明细
     */
    @Override
    public List<TerminalsReplace> selectTerminalsReplaceList(TerminalsReplace terminalsReplace) {
        return terminalsReplaceMapper.selectTerminalsReplaceList(terminalsReplace);
    }

    /**
     * 新增换表明细
     *
     * @param terminalsReplace 换表明细
     * @return 结果
     */
    @Override
    public int insertTerminalsReplace(TerminalsReplace terminalsReplace) {
        return terminalsReplaceMapper.insertTerminalsReplace(terminalsReplace);
    }

    /**
     * 修改换表明细
     *
     * @param terminalsReplace 换表明细
     * @return 结果
     */
    @Override
    public int updateTerminalsReplace(TerminalsReplace terminalsReplace) {
        return terminalsReplaceMapper.updateTerminalsReplace(terminalsReplace);
    }

    /**
     * 批量删除换表明细
     *
     * @param tenantIds 需要删除的换表明细主键
     * @return 结果
     */
    @Override
    public int deleteTerminalsReplaceByTenantIds(String[] tenantIds) {
        return terminalsReplaceMapper.deleteTerminalsReplaceByTenantIds(tenantIds);
    }

    /**
     * 删除换表明细信息
     *
     * @param tenantId 换表明细主键
     * @return 结果
     */
    @Override
    public int deleteTerminalsReplaceByTenantId(String tenantId) {
        return terminalsReplaceMapper.deleteTerminalsReplaceByTenantId(tenantId);
    }
}
